package cn.com.org.service;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Component;

import cn.com.bean.Employees;

@Component
public class HomeService  extends ServiceBaseImpl {

	public  HomeService() {
	}
	@Autowired
	private MongoTemplate mongoTemplate;
	@Autowired
	private StringRedisTemplate redisTeme;

	public Boolean Login(String uname, String pwd) {
		Employees employee = mongoTemplate.findOne(
				new Query(Criteria.where("logname").is(uname).and("password")
						.is(pwd)), Employees.class);
		;
		if (employee!= null) {
			return true;
		}
		return false;
	};

}
